package zxq.rollcall.course.controller.action;

import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import zxq.rollcall.course.entity.dto.ResultDTO;
import zxq.rollcall.course.entity.dto.set.UserDTO;
import zxq.rollcall.course.entity.query.LoadQuery;
import zxq.rollcall.course.entity.query.StudentQuery;
import zxq.rollcall.course.entity.query.TeacherQuery;

@Transactional
public interface IUserController {


    @PostMapping(value = "/insert/student",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "存储学生信息",notes = "存储班级信息")
    @ResponseBody
    ResultDTO<Boolean> insertStudent(StudentQuery studentQuery);


    @PostMapping(value = "/update/student",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "更新学生信息",notes = "存储学生信息")
    @ResponseBody
    ResultDTO<Boolean> updateStudent(Integer id,StudentQuery studentQuery);



    @PostMapping(value = "/insert/teacher",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "插入老师信息",notes = "插入老师信息")
    @ResponseBody
    ResultDTO<Boolean> insertTeacher(TeacherQuery teacherQuery);


    @PostMapping(value = "/update/teacher",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "更新老师信息",notes = "更新老师信息")
    @ResponseBody
    ResultDTO<Boolean> updateTeacher(Integer id, TeacherQuery teacherQuery);


    @PostMapping(value = "/delete",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "删除用户信息",notes = "删除用户信息")
    @ResponseBody
    ResultDTO<Boolean> deleteUser(Integer id);


    @PostMapping(value = "/query",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "查询用户信息",notes = "查询用户信息")
    @ResponseBody
    ResultDTO<UserDTO> queryUserInfo(Integer userId);


    @PostMapping(value = "/load",produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "登陆",notes = "登陆")
    @ResponseBody
    ResultDTO<UserDTO> load(LoadQuery loadQuery);




}
